﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.SolveLoops.CApSolveLoopsLogic
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using EngineeringInternalExtension.ModelObjects;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Tecnomatix.Engineering;


namespace DnProcessSimulateCommands.SolveLoops;

internal class CApSolveLoopsLogic
{
  private ITxKinematicsModellable _device;
  private TxKinematicLink _link;
  private TxObjectList _joints;

  public CApSolveLoopsLogic(TxKinematicLink link, List<TxJoint> joints)
  {
    this._link = link;
    this._joints = new TxObjectList(joints.Count);
    for (int index = 0; index < joints.Count; ++index)
      ((Collection<ITxObject>) this._joints).Add((ITxObject) joints[index]);
    this._device = link.Collection as ITxKinematicsModellable;
  }

  public void Execute()
  {
    ITxKinematicsModellableEx.ComponentSolveKinLoop(this._device, (ITxObject) this._link, this._joints);
  }
}
